#include"Sort.h"


void TestPartSort1()
{
	int a[] = { 5, 3, 9, 6, 2, 4, 7, 1, 8 };
	PrintArray(a, sizeof(a) / sizeof(int));

	//PartSort1(a, 0, sizeof(a) / sizeof(int) - 1);
	PartSort2(a, 0, sizeof(a) / sizeof(int) - 1);
	QuickSort(a, 0, sizeof(a) / sizeof(int) - 1);

	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestMergeSort()
{
	int a[] = { 5, 3, 9, 6, 2, 4, 7, 1, 8 };
	PrintArray(a, sizeof(a) / sizeof(int));

	//PartSort1(a, 0, sizeof(a) / sizeof(int) - 1);
	MergeSort(a, sizeof(a) / sizeof(int));

	PrintArray(a, sizeof(a) / sizeof(int));

	printf("\n");
}

void TestHeapSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8};
	PrintArray(a, sizeof(a) / sizeof(int));

	//PartSort1(a, 0, sizeof(a) / sizeof(int) - 1);
	HeapSort(a, sizeof(a) / sizeof(int));

	PrintArray(a, sizeof(a) / sizeof(int));

	printf("\n");
}

int main()
{
	//TestPartSort1();
	//TestMergeSort();
	TestHeapSort();

	return 0;
}